package com.bootdo.reverseproxy.mask;

import org.springframework.stereotype.Component;
import java.util.*;

@Component
public class RegexString {

    public Map<String, String> getRegexString(){
        Map<String, String> regex = new HashMap<>();
        regex.put("fixedTel","(GDDH|LXDH).{3}(\\d{3}-\\d{8}|\\d{4}-\\d{7})");
        regex.put("birth","(CSRQ.{3}(\\d{8}|\\d{4}-\\d{2}-\\d{2}))");
        regex.put("stuNum","(XH.{3})(\\d{4,16})");
        regex.put("email", "(DZXX|EMAIL).{3}(\\w+(\\.\\w)*@\\w+(\\.\\w{2,3}){1,3})");
        regex.put("phone", "(LXDH|SJHM|XZDH).{3}(1[34578]\\d{9})");
        regex.put("id", "(FZJH|SFZH).{3}(\\d{18}|\\d{17}[X|x])");
        regex.put("personName","(XM.{3})([\\u0391-\\uFFE5]{2,})");
        regex.put("schoolName","(XXMC.{3})([\\u0391-\\uFFE5]+)");
        regex.put("address","(XZZ|XDZ).{3}([\\u0391-\\uFFE5]+)(\\d+[\\u0391-\\uFFE5]+)?");
        return regex;
    }
}
